﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="EditRankingPoints.aspx.vb" Inherits="Assignment4.EditRankingPoints" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 53px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<h1>Edit Ranking Points</h1>
    <p>
        <asp:GridView ID="grvRankings" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC" 
            BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            DataKeyNames="RankingPointId" DataSourceID="SqlDataSourceSelectRankingPoints">
            <Columns>
                <asp:BoundField DataField="RankingPointId" HeaderText="RankingPointId" 
                    InsertVisible="False" ReadOnly="True" SortExpression="RankingPointId" 
                    Visible="False" />
                <asp:BoundField DataField="RankingPointReason" HeaderText="Reason" 
                    SortExpression="RankingPointReason" />
                <asp:BoundField DataField="RankingPointValue" HeaderText="Value" 
                    SortExpression="RankingPointValue" />
                <asp:ButtonField CommandName="Select" Text="Select" />
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
    </p>
    <table class="style1">
        <tr>
            <td class="style2">
                Value</td>
            <td>
                <asp:TextBox ID="txtValue" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtValue" CssClass="lblmessage" ErrorMessage="Enter Value" 
                    ValidationGroup="edit"></asp:RequiredFieldValidator>
&nbsp;
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtValue" CssClass="lblmessage" 
                    ErrorMessage="Enter Numbers Only" ValidationExpression="^[0-9]+$" 
                    ValidationGroup="edit"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnEdit" runat="server" Text="Edit" ValidationGroup="edit" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td>
                <asp:Label ID="lblMessage" runat="server"></asp:Label>
            </td>
        </tr>
    </table>
    <p>
        <asp:SqlDataSource ID="SqlDataSourceSelectRankingPoints" runat="server" 
            ConnectionString="<%$ ConnectionStrings:learningConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:learningConnectionString.ProviderName %>" 
            SelectCommand="SELECT * FROM [RankingPoints]"></asp:SqlDataSource>
    </p>


</asp:Content>
